
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main_mobile.xhtml" contentType="text/html"
	renderKitId="PRIMEFACES_MOBILE">
	<pm:page title="Edição de usuario">
	
			<!-- Main View -->
			<pm:view id="main">
			
				<pm:header title="Edição de usuario" swatch="b">
					<f:facet name="left">
						<p:button style="width:10; height:30; border:1px solid #000;" 
							value="#{messages['button.back']}" icon="back"
							href="#{usuarioEditMB.previousView}"/>
					</f:facet>
					<f:facet name="right">
						<p:button value="#{messages['main.app.title']}" icon="home"
									 href="./navigator.jsf"/>
					 </f:facet>
				</pm:header>
			
				<pm:content>
					<h:form>				
										
					<h:outputText id="id"  label="#{messages['usuario.label.id']}: "
					value="#{usuarioEditMB.bean.id}"/>
					
					
					<p:inputText id="nome"  label="#{messages['usuario.label.nome']}: "
						value="#{usuarioEditMB.bean.nome}" required="true"/>					
					
							<h:outputLabel value="#{messages['usuario.label.dataNascimento']}: " for="dataNascimento" styleClass="text-input" />
							<p:calendar id="dataNascimento" value="#{usuarioEditMB.bean.dataNascimento}"
							   pattern="#{messages['label.date.pattern']}" navigator="true" showButtonPanel="true"
							   locale="#{currentLocale}" title="#{messages['usuario.alt.dataNascimento']}" />							   
											
					<pm:buttonGroup orientation="horizontal" >
						<p:commandButton value="#{messages['button.save']}"
							action="#{usuarioEditMB.update}" icon="check"
							iconPosition="center" />
						<p:commandButton value="#{messages['button.delete']}"
							action="#{usuarioEditMB.delete}"
							rendered="#{usuarioEditMB.updateMode}" icon="delete"
							iconPosition="center" />
					</pm:buttonGroup>
										
					</h:form>
				</pm:content>
			</pm:view>
		</pm:page>
	
</f:view>